import Vue from 'vue'
import Router from 'vue-router'
import axios from 'axios'
import VueAxios from 'vue-axios'
import CityList from '../components/city/CityList'
import Login from '../components/city/Login_xsh'
import CitySearch from '../components/city/CitySearch_xsh'
import Reset from  '../components/city/Reset'
import Foot from '../components/footer/foot'
import Search from '../components/footer/Search'
import Indent from '../components/footer/Indent'
import Mineed from '../components/footer/mineed'
import TakeAway from '../components/tackOut/takeaway'
import DownLoad from '../components/MyCenter/myChild_lxh/download'
import Mall from '../components/MyCenter/myChild_lxh/mall'
import Service from '../components/MyCenter/myChild_lxh/service'
import member from '../components/MyCenter/myChild_lxh/mix/member'
import Sign from '../components/MyCenter/myChild_lxh/mix/Sign'
import Grade from '../components/MyCenter/myChild_lxh/mix/Grade'
import Integral from '../components/MyCenter/myChild_lxh/mix/Integral'
import help from '../components/MyCenter/myChild_lxh/mix/help'
import Pay from '../components/MyCenter/myChild_lxh/mix/Pay'
import Other from '../components/MyCenter/myChild_lxh/mix/Other'
import Arrive from '../components/MyCenter/myChild_lxh/mix/Arrive'
import memberTimesCaption from '../components/MyCenter/myChild_lxh/mix/memberTimesCaption'
import memberCaption from '../components/MyCenter/myChild_lxh/mix/memberCaption'
import Red from '../components/MyCenter/myChild_lxh/mix/Red'
import Rules from '../components/MyCenter/myChild_lxh/mix/Rules'
import Retroactive from '../components/MyCenter/myChild_lxh/mix/Retroactive'
import Preferential from '../components/MyCenter/myChild_lxh/mix/Preferential'
import relief from '../components/MyCenter/myChild_lxh/mix/relief'
import Voucher from '../components/MyCenter/myChild_lxh/mix/Voucher'
import Business from '../components/MyCenter/myChild_lxh/mix/Business'
import Balance from '../components/MyCenter/myChild_lxh/mix/Balance'
import Awesome from '../components/MyCenter/myChild_lxh/mix/Awesome'
import Anonymous from '../components/MyCenter/myChild_lxh/mix/Anonymous'
import activity from '../components/MyCenter/myChild_lxh/mix/activity'
import Membership  from '../components/MyCenter/myChild_lxh/Membership'
import account from '../components/MyCenter/account/Account'
import alter from '../components/MyCenter/account/alter'
import site from '../components/MyCenter/account/site'
import increase from '../components/MyCenter/account/increase'
import searchAddress from '../components/MyCenter/account/searchAddress'
import Privilege from '../components/MyCenter/myChild_lxh/elmHYK/Privilege'
import payment from '../components/MyCenter/myChild_lxh/elmHYK/payment'
import Balances from '../components/MyCenter/myChild_lxh/elmHYK/Balances'
import mon from '../components/MyCenter/myChild_lxh/elmHYK/mon'
import MyIntegral from '../components/MyCenter/myChild_lxh/elmHYK/MyIntegral'
import monT from '../components/MyCenter/myChild_lxh/elmHYK/monT'
import MyPreferential from '../components/MyCenter/myChild_lxh/elmHYK/MyPreferential'
import redExplain from '../components/MyCenter/myChild_lxh/elmHYK/redExplain'
import One from '../components/MyCenter/myChild_lxh/elmHYK/One'
import MyVoucher from '../components/MyCenter/myChild_lxh/elmHYK/MyVoucher'

import Evaluation from '../components/tackOut/Evaluation'
import ExchangeMem from '../components/MyCenter/myChild_lxh/elmHYK/ExchangeMem'
import HistoricalRed from '../components/MyCenter/myChild_lxh/elmHYK/HistoricalRed'
import DH_Red from '../components/MyCenter/myChild_lxh/elmHYK/DH_Red'
import MyRecommend from '../components/MyCenter/myChild_lxh/elmHYK/MyRecommend'

import FoodClass from '../components/tackOut/FoodClass'
import Store from '../components/tackOut/Store'
import StoreDetails from '../components/tackOut/StoreDetails'
import ShopSafe from '../components/tackOut/ShopSafe'
import Commodity from '../components/tackOut/Commodity'

import GoodDetails from '../components/tackOut/goodDetails'
import Car from '../components/shopCar/car'
import CarAddress from '../components/shopCar/car_address'
import CarTJ from '../components/shopCar/car_TJ'
import CarFQ from '../components/shopCar/car_FQ'
import CarOrder from '../components/shopCar/car_Order'
import CarDZ from '../components/shopCar/car_DZ'



Vue.use(Router);
Vue.use(VueAxios, axios);

export default new Router({
  routes: [
    // 重定向
    {path:'/', redirect:'/cityList'},
    {path:'/cityList', component:CityList, name:'cityList'},//城市列表
    {path:'/cityList/login', component:Login, name: 'login'},//登录注册
    {path: '/cityList/reset', component:Reset, name: 'reset'},// 重置密码
    {path:'/citySearch', component:CitySearch, name:'citySearch'},//搜索所在城市
    {path: '/foot', component: Foot, name:'foot',children: [
        {path: 'indent', component:Indent, name:'indent'},//订单组件
        {path: 'search', component:Search, name:'search'},//搜索组件
        {path: 'mineed', component:Mineed, name:'mineed'},// 我的组件
        {path: 'takeaway', component:TakeAway, name:'takeaway'},//外卖
      ]},//底部导航条
    {path: 'download', component: DownLoad, name:'download'},//下载饿了么
    {path: 'mall', component: Mall, name:'mall'}, //积分商城
    {path:'/service',component:Service,name:'service'}, //服务中心
    {path:'Membership',component:Membership,name:'Membership'},//饿了么会员中心


    {path:'/service/member',component:member,name:'member'},//超级会员权益说明
    {path:'/service/Sign',component:Sign,name:'Sign'},//签到规则
    {path:'/service/Grade',component:Grade,name:'Grade'},//用户等级说明
    {path:'/service/Integral',component:Integral,name:'Integral'},//积分问题
    {path:'/service/help',component:help,name:'help'},//教我拍大片
    {path:'/service/Pay',component:Pay,name:'Pay'},//支付问题
    {path:'/service/Other',component:Pay,name:'Other'},//其他问题
    {path:'/service/Arrive',component:Arrive,name:'Arrive'},//准时达问题
    {path:'/service/memberTimesCaption',component:memberTimesCaption,name:'memberTimesCaption'},//会员说明
    {path:'/service/memberCaption',component:memberCaption,name:'memberCaption'},//会员问题
    {path:'/service/Red',component:Red,name:'Red'},//红包问题
    {path:'/service/Rules',component:Rules,name:'Rules'},//游戏细规
    {path:'/service/Retroactive',component:Retroactive,name:'Retroactive'},//补签规则
    {path:'/service/Preferential',component:Preferential,name:'Preferential'},//优惠说明
    {path:'/service/relief',component:relief,name:'relief'},//优惠说明
    {path:'/service/Voucher',component:Voucher,name:'Voucher'},//代金卷说明
    {path:'/service/Business',component:Business,name:'Business'},//商务合作
    {path:'/service/Balance',component:Balance,name:'Balance'},//余额问题
    {path:'/service/Awesome',component:Awesome,name:'Awesome'},//超赞用户
    {path:'/service/Anonymous',component:Anonymous,name:'Anonymous'},//匿名购买
    {path:'/service/activity',component:activity,name:'activity'},//活动问题


    {path:'/account', component:account, name:'account'},// 修改头像
    {path:'/account/alter', component:alter,name:'alter'},// 修改用户名
    {path:'/account/site', component:site,name:'site'},// 修改收货地址
    {path:'/account/site/increase', component:increase,name:'increase'},// 新增收货地址
    {path:'/account/site/increase/searchAddress', component:searchAddress,name:'searchAddress'},// 搜索地址

    {path:'/Membership/Privilege',component:Privilege,name:'Privilege'},//饿了么会员卡中的我的优惠
    {path:'/Membership/payment',component:payment,name:'payment'},//饿了么会员卡中的在线支付
    {path:'/Membership/Balances',component:Balances,name:'Balances'},//我的余额
    {path:'/Membership/mon',component:mon,name:'mon'},//明细
    {path:'/Membership/MyIntegral',component:MyIntegral,name:'MyIntegral'},//积分
    {path:'/Membership/monT',component:monT,name:'monT'},//积分说明
    {path:'/Membership/MyPreferential',component:MyPreferential,name:'MyPreferential',redirect:'/Membership/MyPreferential/One', children:[
        // 重定向   问题重定向！！！！！！！
        {path:'One',component:One,name:'One'},//红包
        {path:'MyVoucher',component:MyVoucher,name:'MyVoucher'},//代金卷
      ]},//我的优惠
    {path:'/Membership/redExplain',component:redExplain,name:'redExplain'},//红包说明
    {path:'/foot/takeaway/foodclass', component:FoodClass, name:'foodclass'},//食品分类组件(点击轮播图进入)

    {path:'/Membership/ExchangeMem',component:ExchangeMem,name:'ExchangeMem'},//兑换会员
    {path:'/Membership/HistoricalRed',component:HistoricalRed,name:'HistoricalRed'},//历史红包
    {path:'/Membership/DH_Red',component:DH_Red,name:'DH_Red'},//兑换红包
    {path:'/Membership/MyRecommend',component:MyRecommend,name:'Recommend'},//推荐有奖

    {path:'/foot/takeaway/store', component:Store, name:'store', redirect:'/foot/takeaway/store/commodity', children:[
        {path:'commodity',component: Commodity, name:'commodity'},// 商品页面
        {path:'Evaluation',component:Evaluation,name:'evaluation'},//商品评价
      ]},  //各个店铺页面

    {path:'/foot/takeaway/store/details', component: StoreDetails, name:'details'},//店铺详情页面
    {path:'/foot/takeaway/store/safe', component: ShopSafe, name:'safe'},//店铺安全监督页面

    {path:'/foot/takeaway/store/commodity/goodDetails', component:GoodDetails, name:'goodDetails'},
    {path:'/foot/takeaway/store/commodity/car', component:Car, name:'car'},//购物车
    {path:'/foot/takeaway/store/commodity/address', component:CarAddress, name:'car_address'},//购物车选择地址
    {path:'/foot/takeaway/store/commodity/addaddress', component:CarTJ, name:'car_TJ'},// 新增地址
    {path:'/foot/takeaway/store/commodity/carfq', component:CarFQ, name:'car_FQ'},// 发票
    {path:'/foot/takeaway/store/commodity/carorder', component:CarOrder, name:'car_Order'},// 备注
    {path:'/foot/takeaway/store/commodity/cardz', component:CarDZ, name:'car_DZ'},// 添加地址
    {path:'*', component:CityList}
  ]
})
